package com.zzuli.ylsystem.dao;

import com.zzuli.ylsystem.entity.Medicalimgs;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MedicalimgsDao {
    int deleteByPrimaryKey(Integer id);

    int insert(Medicalimgs record);

    int insertSelective(Medicalimgs record);

    Medicalimgs selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Medicalimgs record);

    int updateByPrimaryKey(Medicalimgs record);

    @Select("select * from medicalimgs where user=#{userId}")
    Medicalimgs findMedByUser(Integer userId);

    int updateByUserId(Medicalimgs record);

    @Select("select time from medicalimgs where user=#{id}")
    List<String> findTimesByUserId(Integer id);

    @Select("select * from medicalimgs where user=#{id} and time=#{time}")
    Medicalimgs selectUserImgByOneTime(Integer id, String time);

    @Select("select time from medicalimgs where time=#{time}")
    String findMedTime(String time);
}